package com.kjtpay.design_pattern.mediator;

/**
 * 安理会；ConcreteMediator；这里专门处理美国和伊拉克的交互
 */
class SecurityCouncil extends UnitedNations {
    public USA usa;
    public Iraq iraq;

    @Override
    public void declare(String message, Country country) {
        // 作为中间人，传话
        if (country == usa) {
            iraq.getMessage(message, usa.name);
        }
        if (country == iraq) {
            usa.getMessage(message, iraq.name);
        }
    }
}
